﻿using System;
using System.Data;
using System.Data.Common;
using Liger.Common;
using Liger.Data;

namespace EasyFMS.Model
{

	/// <summary>
	/// 实体类vCostNo
	/// </summary>
	[Serializable]
	public class vCostNo : Entity 
	{ 
		 public vCostNo() 
            : base("vCostNo") 
        { 

        }


		#region Model
		private int _UID;
		private string _CollateNo;
		private string _CostNO;
		private int? _CostType;
		private string _TaxRate;
		private string _Amount;
		private string _Amount2;
		private bool? _ISConfirm;
		private string _ConfirmDate;
		private string _UserConfirm;
		private int? _UserconfirmID;
		private string _Tax;
		private string _Note;
		private bool? _IsSelect;
		private int? _UserCreateID;
		private string _CreateDate;
		private int? _UserModifyID;
	 
		/// <summary>
		/// 
		/// </summary>
		public int UID
		{
			get{ return _UID; }
			set
			{
				this.OnPropertyValueChange(_.UID,_UID,value);
				this._UID = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string CollateNo
		{
			get{ return _CollateNo; }
			set
			{
				this.OnPropertyValueChange(_.CollateNo,_CollateNo,value);
				this._CollateNo = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string CostNO
		{
			get{ return _CostNO; }
			set
			{
				this.OnPropertyValueChange(_.CostNO,_CostNO,value);
				this._CostNO = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public int? CostType
		{
			get{ return _CostType; }
			set
			{
				this.OnPropertyValueChange(_.CostType,_CostType,value);
				this._CostType = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string TaxRate
		{
			get{ return _TaxRate; }
			set
			{
				this.OnPropertyValueChange(_.TaxRate,_TaxRate,value);
				this._TaxRate = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string Amount
		{
			get{ return _Amount; }
			set
			{
				this.OnPropertyValueChange(_.Amount,_Amount,value);
				this._Amount = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string Amount2
		{
			get{ return _Amount2; }
			set
			{
				this.OnPropertyValueChange(_.Amount2,_Amount2,value);
				this._Amount2 = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public bool? ISConfirm
		{
			get{ return _ISConfirm; }
			set
			{
				this.OnPropertyValueChange(_.ISConfirm,_ISConfirm,value);
				this._ISConfirm = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string ConfirmDate
		{
			get{ return _ConfirmDate; }
			set
			{
				this.OnPropertyValueChange(_.ConfirmDate,_ConfirmDate,value);
				this._ConfirmDate = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string UserConfirm
		{
			get{ return _UserConfirm; }
			set
			{
				this.OnPropertyValueChange(_.UserConfirm,_UserConfirm,value);
				this._UserConfirm = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public int? UserconfirmID
		{
			get{ return _UserconfirmID; }
			set
			{
				this.OnPropertyValueChange(_.UserconfirmID,_UserconfirmID,value);
				this._UserconfirmID = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string Tax
		{
			get{ return _Tax; }
			set
			{
				this.OnPropertyValueChange(_.Tax,_Tax,value);
				this._Tax = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string Note
		{
			get{ return _Note; }
			set
			{
				this.OnPropertyValueChange(_.Note,_Note,value);
				this._Note = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public bool? IsSelect
		{
			get{ return _IsSelect; }
			set
			{
				this.OnPropertyValueChange(_.IsSelect,_IsSelect,value);
				this._IsSelect = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public int? UserCreateID
		{
			get{ return _UserCreateID; }
			set
			{
				this.OnPropertyValueChange(_.UserCreateID,_UserCreateID,value);
				this._UserCreateID = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string CreateDate
		{
			get{ return _CreateDate; }
			set
			{
				this.OnPropertyValueChange(_.CreateDate,_CreateDate,value);
				this._CreateDate = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public int? UserModifyID
		{
			get{ return _UserModifyID; }
			set
			{
				this.OnPropertyValueChange(_.UserModifyID,_UserModifyID,value);
				this._UserModifyID = value;
			}
		}
		#endregion

		#region Method
		/// <summary>
		/// 获取列信息
		/// </summary>
		public override Field[] GetFields()
		{
			return new Field[] {
				_.UID,
				_.CollateNo,
				_.CostNO,
				_.CostType,
				_.TaxRate,
				_.Amount,
				_.Amount2,
				_.ISConfirm,
				_.ConfirmDate,
				_.UserConfirm,
				_.UserconfirmID,
				_.Tax,
				_.Note,
				_.IsSelect,
				_.UserCreateID,
				_.CreateDate,
				_.UserModifyID
			};
		}
		/// <summary>
		/// 获取值信息
		/// </summary>
		public override object[] GetValues()
		{
			return new object[] {
				_UID,
				_CollateNo,
				_CostNO,
				_CostType,
				_TaxRate,
				_Amount,
				_Amount2,
				_ISConfirm,
				_ConfirmDate,
				_UserConfirm,
				_UserconfirmID,
				_Tax,
				_Note,
				_IsSelect,
				_UserCreateID,
				_CreateDate,
				_UserModifyID
			};
		} 
		/// <summary>
		/// 设置字段值
		/// </summary>
		public override void SetValue(string fieldName, object value)
        {
            switch (fieldName)
            { 
				case "UID":
                    this._UID = DataHelper.ConvertValue<int>(value);
                    break; 
				case "CollateNo":
                    this._CollateNo = DataHelper.ConvertValue<string>(value);
                    break; 
				case "CostNO":
                    this._CostNO = DataHelper.ConvertValue<string>(value);
                    break; 
				case "CostType":
                    this._CostType = DataHelper.ConvertValue<int?>(value);
                    break; 
				case "TaxRate":
                    this._TaxRate = DataHelper.ConvertValue<string>(value);
                    break; 
				case "Amount":
                    this._Amount = DataHelper.ConvertValue<string>(value);
                    break; 
				case "Amount2":
                    this._Amount2 = DataHelper.ConvertValue<string>(value);
                    break; 
				case "ISConfirm":
                    this._ISConfirm = DataHelper.ConvertValue<bool?>(value);
                    break; 
				case "ConfirmDate":
                    this._ConfirmDate = DataHelper.ConvertValue<string>(value);
                    break; 
				case "UserConfirm":
                    this._UserConfirm = DataHelper.ConvertValue<string>(value);
                    break; 
				case "UserconfirmID":
                    this._UserconfirmID = DataHelper.ConvertValue<int?>(value);
                    break; 
				case "Tax":
                    this._Tax = DataHelper.ConvertValue<string>(value);
                    break; 
				case "Note":
                    this._Note = DataHelper.ConvertValue<string>(value);
                    break; 
				case "IsSelect":
                    this._IsSelect = DataHelper.ConvertValue<bool?>(value);
                    break; 
				case "UserCreateID":
                    this._UserCreateID = DataHelper.ConvertValue<int?>(value);
                    break; 
				case "CreateDate":
                    this._CreateDate = DataHelper.ConvertValue<string>(value);
                    break; 
				case "UserModifyID":
                    this._UserModifyID = DataHelper.ConvertValue<int?>(value);
                    break; 
            }
        }
		/// <summary>
		/// 获取字段值
		/// </summary>
        public override object GetValue(string fieldName)
        {
            switch (fieldName)
            { 
				case "UID":
                    return this._UID; 
				case "CollateNo":
                    return this._CollateNo; 
				case "CostNO":
                    return this._CostNO; 
				case "CostType":
                    return this._CostType; 
				case "TaxRate":
                    return this._TaxRate; 
				case "Amount":
                    return this._Amount; 
				case "Amount2":
                    return this._Amount2; 
				case "ISConfirm":
                    return this._ISConfirm; 
				case "ConfirmDate":
                    return this._ConfirmDate; 
				case "UserConfirm":
                    return this._UserConfirm; 
				case "UserconfirmID":
                    return this._UserconfirmID; 
				case "Tax":
                    return this._Tax; 
				case "Note":
                    return this._Note; 
				case "IsSelect":
                    return this._IsSelect; 
				case "UserCreateID":
                    return this._UserCreateID; 
				case "CreateDate":
                    return this._CreateDate; 
				case "UserModifyID":
                    return this._UserModifyID; 
				default :
                    return null;
            } 
        }



		#endregion

		#region _Field
		/// <summary>
		/// 字段信息
		/// </summary>
		public class _
		{
			/// <summary>
			/// * 
			/// </summary>
			public readonly static Field All = new Field("*","vCostNo");
 
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field UID = new Field("UID","vCostNo","UID");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field CollateNo = new Field("CollateNo","vCostNo","CollateNo");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field CostNO = new Field("CostNO","vCostNo","CostNO");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field CostType = new Field("CostType","vCostNo","CostType");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field TaxRate = new Field("TaxRate","vCostNo","TaxRate");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field Amount = new Field("Amount","vCostNo","Amount");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field Amount2 = new Field("Amount2","vCostNo","Amount2");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field ISConfirm = new Field("ISConfirm","vCostNo","ISConfirm");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field ConfirmDate = new Field("ConfirmDate","vCostNo","ConfirmDate");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field UserConfirm = new Field("UserConfirm","vCostNo","UserConfirm");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field UserconfirmID = new Field("UserconfirmID","vCostNo","UserconfirmID");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field Tax = new Field("Tax","vCostNo","Tax");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field Note = new Field("Note","vCostNo","Note");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field IsSelect = new Field("IsSelect","vCostNo","IsSelect");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field UserCreateID = new Field("UserCreateID","vCostNo","UserCreateID");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field CreateDate = new Field("CreateDate","vCostNo","CreateDate");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field UserModifyID = new Field("UserModifyID","vCostNo","UserModifyID");
		}
		#endregion

 
	}
}

